<template>
    <fieldset>
        <legend>输入框1</legend>
        <input type="text" :value="msg1" @input="ipt1">
    </fieldset>
    <br>
    <fieldset>
        <legend>输入框2</legend>
        <input type="text" :value="msg2" @input="ipt2">
    </fieldset>
</template>
<script>
    export default {
        props: [
            "msg1",
            "msg2"
        ],
        methods: {
            ipt1(e){
                this.$emit('update:msg1',e.target.value);
            },
            ipt2(e){
                this.$emit('update:msg2',e.target.value);
            },
        }
    }
</script>